From f85ee952a02245e59fb9e1da63a1c4586dc9372b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Fri, 26 Sep 2025 06:29:16 +0200 Subject: [PATCH] notificationDamon: Always send the activation token In case of FDO notifications, we may receive a notification coming from non-desktop-applications (e.g. gsd does that), but in any case when activating an action we should always provide back the activation-token. So send the startup notification ID in any case, even if the appId is unset (in fact get_startup_notify_id() uses a nullable parameter for a reason since GNOME/glib@6210708f). In wayland this more than enough, while in X11 we could have used the gnome-shell desktop file as fallback, but that's gone for good now! Fixes: bb73bf5 Part-of: --- js/ui/notificationDaemon.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js index 07ef7be61..00a3dbcdb 100644 --- a/js/ui/notificationDaemon.js +++ b/js/ui/notificationDaemon.js @@ -304,12 +304,10 @@ class FdoNotificationDaemon { _emitActivationToken(source, id) { const context = global.create_app_launch_context(0, -1); - const info = source.app?.get_app_info(); - if (info) { - const token = context.get_startup_notify_id(info, []); - this._dbusImpl.emit_signal('ActivationToken', - GLib.Variant.new('(us)', [id, token])); - } + const appInfo = source.app?.get_app_info() ?? null; + const token = context.get_startup_notify_id(appInfo, []); + this._dbusImpl.emit_signal('ActivationToken', + GLib.Variant.new('(us)', [id, token])); } } -- 2.39.5